#!/usr/bin/env python3.3

#
#  Filename: e21.py
#  Author  : lukas singer
#
#  Comment : Created by createSolution.sh
#            Amicable Numbers

#import euler
from euler import getSumOfProperDivisors

def pe21():
  target=10000
  result=0
  for a in range(3,target):
    b=getSumOfProperDivisors(a)
    if a<b:
      if a==getSumOfProperDivisors(b):
        result+=(a+b)
  print(result)
if __name__=="__main__":
  pe21()

